<?php
header("Content-type:application/json");
$configs = ini_get_all();
$configArray = array();
foreach ($configs as $key => $value) {
    if (is_array($value)) {
        $configArray[$key] = $value;
    } else {
        $configArray[$key] = array('value' => $value);
    }
}
echo json_encode($configArray);